package models

import (
	"github.com/zeromicro/go-zero/core/stores/cache"
	"gorm.io/gorm"
)

var _ OrderModel = (*customOrderModel)(nil)

type (
	// OrderModel is an interface to be customized, add more methods here,
	// and implement the added methods in customOrderModel.
	OrderModel interface {
		orderModel
		customOrderLogicModel
	}

	customOrderModel struct {
		*defaultOrderModel
	}

	customOrderLogicModel interface {
	}
)

// NewOrderModel returns a model for the database table.
func NewOrderModel(conn *gorm.DB, c cache.CacheConf) OrderModel {
	return &customOrderModel{
		defaultOrderModel: newOrderModel(conn, c),
	}
}

func (m *defaultOrderModel) customCacheKeys(data *Order) []string {
	if data == nil {
		return []string{}
	}
	return []string{}
}
